const { execquery } = require('../database/mysql')

const login = (username, password) => {
  const sql = `select username,relname from users where username='${username}' and password='${password}';`
  return execquery(sql).then(rows => {
    return rows[0]
  })
}

module.exports = {
  login
}